1. Field of the Invention
The present invention relates to an NC machining simulation apparatus for simulating a machining operation according to an NC program including consecutive machining processes each constituted by one or more execution blocks by displaying the configuration of a tool and the configuration of a workpiece on a display device and successively changing the tool configuration and the workpiece configuration on the display device in accordance with the NC program so as to check the movement and machining state of the tool on the display device.
2. Description of the Prior Art
The operation of an NC machine tool is generally controlled in accordance with an NC program. Conventionally, the NC program is created manually by a programmer or by means of an automatic programming apparatus. In either case, it is necessary to check if tool paths and machining conditions are properly defined by the NC program thus created before a machining operation is performed with the use of the NC program.
Conventionally known as an apparatus for performing the aforesaid checking operation is an NC machining simulation apparatus for simulating a machining operation according to an NC program including consecutive machining processes each constituted by one or more execution blocks by displaying the configuration of a tool and the configuration of a workpiece on a display device and successively changing the tool configuration and the workpiece configuration on the display device in accordance with the NC program to check the movement and machining state of the tool on the display device.
The NC machining simulation apparatus analyzes each of the execution blocks of the NC program. Then, the apparatus successively generates pixel data indicative of the tool configuration and the workpiece configuration for the respective blocks on the basis of preliminarily inputted tool configuration data and workpiece configuration data, and displays the tool configuration and the workpiece configuration on the display device on the basis of the pixel data thus generated.
However, the conventional NC machining simulation apparatus simulates the machining operation by analyzing the NC program from the first execution block thereof. Therefore, it is impossible to start the machining simulation from an intermediate execution block of the NC program.
Where the simulation indicates a need for modification of an execution block of the NC program and the block is modified, for example, the machining simulation should be performed again for the modified block and blocks subsequent thereto to check if the NC program properly works. However, the conventional NC machining simulation apparatus cannot start the simulation from the modified block but from the first block of the NC program, requiring much time for checking the NC program after the modification.
Where a machining state simulated according to an intended execution block of the NC program cannot satisfactorily be checked during the machining simulation, it is convenient to retrospectively check the machining state. Since the conventional NC machining simulation apparatus always starts the simulation from the first block of the NC program as described above, it is inconvenient to re-check the machining state simulated according to the intended execution block by performing the simulation again from the start.
In view of the foregoing, it is an object of the present invention to provide a more convenient machining simulation apparatus which can start the machining simulation from an intermediate execution block of an NC program or retrospectively check a machining state simulated according to a precedent execution block of the NC program.
In accordance with the present invention to achieve the aforesaid object, there is provided an NC machining simulation apparatus for simulating a machining operation in accordance with an NC program including consecutive machining processes each constituted by one or more execution blocks by displaying the configuration of a tool and the configuration of a workpiece on a display device and successively changing the tool configuration and the workpiece configuration on the display device in accordance with the NC program so as to check the movement and machining state of the tool on the display device, the apparatus comprising: a tool data storage section storing therein tool configuration data; a workpiece configuration data storage section storing therein workpiece configuration data; an NC program storage section storing therein the NC program; an image data generating section which successively analyzes the respective execution blocks of the NC program and successively generates pixel data indicative of the tool configuration and the workpiece configuration for the respective execution blocks on the basis of the tool configuration data stored in the tool data storage section and the workpiece configuration data stored in the workpiece configuration data storage section; a graphic section which displays the tool configuration and the workpiece configuration on the display device on the basis of the pixel data generated by the image data generating section; and a process image data storage section for storing therein pixel data generated at the end of each of the machining processes by the image data generating section; wherein the image data generating section, in response to designation of a machining process externally inputted thereto, reads pixel data generated at the end of a machining process precedent to the designated machining process from the process image data storage section to cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the read pixel data, and successively regenerates pixel data for the designated machining process and machining processes subsequent thereto to cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the re-generated pixel data.
In the present invention, the image data generating section successively analyzes the respective execution blocks of the NC program stored in the NC program storage section, and successively generates pixel data indicative of the tool configuration and the workpiece configuration for the respective execution blocks on the basis of the tool configuration data stored in the tool data storage section and the workpiece configuration data stored in the workpiece configuration data storage section. Then, the graphic section displays the tool configuration and the workpiece configuration on the display device on the basis of the pixel data generated by the image data generating section. Further, pixel data generated at the end of each of the machining processes by the image data generating section is stored in the process image data storage section.
When a signal for designation of a specific machining process is externally inputted to the image data generating section, the image data generating section reads pixel data generated at the end of a machining process precedent to the designated machining process from the process image data storage section to cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the read pixel data. Further, the image data generating section successively analyzes the designated machining process and machining processes subsequent thereto, and successively regenerates pixel data for these machining processes to cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the re-generated pixel data.
With this arrangement, the machining simulation can be restarted from an intermediate machining process (execution block) of the NC program. Where the simulation indicates a need for modification of an execution block of the NC program and the block is modified, for example, the simulation can be performed again for the modified block and blocks subsequent thereto. Thus, the inventive NC machine simulation apparatus can check the modified NC program in a shorter time than the conventional NC machining simulation apparatus.
The NC machining simulation apparatus may further comprise a coordinate inputting device for inputting a coordinate position on a screen image displayed on the display device, and the image data generating section may be adapted to generate image data including pixel data updated from the pixel data generated at the end of each of the machining processes and process specification information specifying the corresponding machining process, and store the generated image data in the process image data storage section, wherein the image data generating section, upon detection of the coordinate position inputted from the coordinate inputting device, detects process specification information indicative of a machining process related to a pixel corresponding to the detected coordinate position in image data serving as the base of an image currently displayed on the display device, reads image data generated at the end of a machining process precedent to the detected machining process from the process image data storage section to cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the read image data, and successively re-generates image data for the detected machining process and machining processes subsequent thereto to cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the re-generated image data.
In the NC machining simulation apparatus, image data including pixel data updated from the pixel data generated at the end of each of the machining processes by the image data generating section and process specification information specifying the corresponding machining process is generated, and stored in the process image data storage section. More specifically, pixel data generated for the first machining process is stored along with information (process specification information) specifying the first machining process in the process image data storage section and, thereafter, the pixel data in the process image data storage section is replaced with pixel data updated by sequentially analyzing the NC program. For the pixel data updated from the pixel data generated at the end of the machining process, the process specification information is updated with process specification information specifying the machining process.
When a coordinate position of a particular workpiece portion to be machined in accordance with a modified machining process of the NC program is inputted on a screen image displayed on the display device by the coordinate inputting device, for example, the image data generating section detects the coordinate position, and detects process specification information related to a pixel corresponding to the coordinate position in image data serving as the base of the currently displayed image. Then, the image data generating section reads image data generated at the end of a machining process precedent to the detected machining process from the process image data storage section to cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the read image data, and successively re-generates image data for the detected machining process and the machining processes subsequent thereto to cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the generated image data.
With this arrangement, the NC machining simulation apparatus can restart the machining simulation from an intermediate machining process (execution block) of the NC program as in the aforesaid case. Where an execution block of the NC program is modified, the simulation for the modified block and blocks subsequent thereto can be started from the modified block. Therefore, the inventive NC machining simulation apparatus can check the modified NC program in a shorter time than the conventional NC machining simulation apparatus. Since the machining process to be subjected to the re-simulation can easily be designated on a screen image displayed on the display device, the re-simulation can rapidly be performed.
The NC machining simulation apparatus may further comprise a block image data storage section for storing therein the pixel data generated at the end of each of the execution blocks by the image data generating section for each of the execution blocks, and the image data generating section may be adapted to read pixel data for a precedent execution block from the block image data storage section upon reception of a back command externally inputted thereto, and cause the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the read pixel data.
With this arrangement, the pixel data generated at the end of each of the execution blocks by the image data generating section is stored for each of the execution blocks in the block image data storage section. When the back command for displaying a screen image for a precedent execution block is externally inputted, the image data generating section reads pixel data for the precedent execution block from the block image data storage section upon reception of the back command, and causes the graphic section to display the tool configuration and the workpiece configuration on the display device on the basis of the read pixel data.
In the NC machining simulation apparatus, a tool image and a workpiece image for the precedent execution block can retrospectively be displayed on the display device by externally inputting the back command. Where a machining state simulated according to an intended execution block of the NC program cannot satisfactorily be checked during the simulation, the machining state can retrospectively be checked.
The pixel data herein termed is intended to include positional data, color data and the like for each pixel.